.lib "bbAddon.dll"

; ------------ Maths ------------
RadToDeg#(Angle#):"_RadToDeg@4"
DegToRad#(Angle#):"_DegToRad@4"
Min#(a#,b#):"_Min@8"
Max#(a#,b#):"_Max@8"
LinearInterp#(a#,b#,rate#):"_LinearInterp@12"
CosInterp#(a#,b#,rate#):"_CosInterp@12"
CubicInterp#(a#,b#,c#,d#,rate#):"_CubicInterp@20"


; ------------ Vector2 ------------
Vector2%(x#,y#):"_NewVector2@8"
DeleteVector2%(v):"_DeleteVector2@4"

SetVector2(v, x#,y#):"_SetVector2@12"
SetVector2X(v, x#):"_SetVector2X@8"
SetVector2Y(v, y#):"_SetVector2Y@8"

Vector2Equal%(v1,v2):"_Vector2Equal@8"

Vector2x#(v):"_Vector2X@4"
Vector2y#(v):"_Vector2Y@4"
Vector2Angle#(v1,v2):"_Vector2Angle@8"
Vector2Mag#(v):"_Vector2Mag@4"
Vector2SquareMag#(v):"_Vector2SquareMag@4"
Vector2Dot#(v1,v2):"_Vector2Dot@8"
Vector2Cross#(v1,v2):"_Vector2Cross@8"

MagVector2#(v):"_MagVector2@4"


; ------------ Events ------------

EmitEvent(Id%,X%,Y%,Data$,Source%):"_EmitEvent@20"
PollEvent%():"_PollEvent@0"
EventID%():"_EventID@0"
EventX%():"_EventX@0"
EventY%():"_EventY@0"
EventSource%():"_EventSource@0"
EventData$():"_EventData@0"

EventEnableStack(Enable%):"_EventEnableStack@4"
EventStackEnabled%():"_EventStackEnabled@0"
SetEventStackSize(size%):"_SetEventStackSize@4"
EventStackSize%():"_EventStackSize@0"
CountEvents%():"_CountEvents@0"


; ------------ Counter ------------

HDTSupport%():"_HDTSupport@0"

Millisecondes%():"_Millisecondes@0"
SystemCounter%():"_SystemCounter@0"
ResetClock ():"_ResetClock@0"
MicroSecs%():"_MicroSecs@0"
ComputerTime%():"_ComputerTime@0"
ElapsedTime%():"_ElapsedTime@0"
PITClock#():"_PITClock@0"
AppMicroCoef#():"_AppMicroCoef@0"

CreateCounter%():"_CreateCounter@0"
ResetCounter( counter ):"_ResetCounter@4"
CounterTime %( counter ):"_CounterTime@4"
CounterElasped%( counter ):"_CounterElasped@4"
CounterFree( counter ) :"_CounterFree@4"
CounterStartedAt%( counter ):"_CounterStartedAt@4"


; ------------ Linked-List ------------

DebugCountLinks%():"_DebugCountLinks@0"
NewList%():"_NewList@0"
AddLast%(List,value$):"_ListAddLast@8"
AddFirst%(List,value$):"_ListAddFirst@8"
InsertBefore%(Link,before):"_ListInsertBefore@8"
InsertAfter%(Link,after):"_ListInsertAfter@8"
DeleteList(List):"_DeleteList@4"
DeleteLink(Link):"_DeleteLink@4"
ListContains%(List,Value$):"_ListContains@8"
ListIsEmpty%(List):"_ListIsEmpty@4"
ListFirst%(list):"_FirstLink@4"
ListLast%(list):"_LastLink@4"
AfterLink%(link):"_AfterLink@4"
BeforeLink%(link):"_BeforeLink@4"
LinkValue$(link):"_LinkValue@4"
SetLinkValue(Link,value$):"_SetLinkValue@8"

LinkCompare%(l1,l2):"_LinkCompare@8"
StrCompare%(a$,b$):"_StrCompare@8"
SwapLinks%(link1,link2):"_SwapLinks@8"
SortList%(List,Sens):"_SortList@8"


; ------------ Tokenizer ------------
Tokenize%(chaine$,Delimiters$, Symbols$):"_cTokenize@12"


; ------------ SSE ------------
TypePointer%(type*):"_TypePointer@4"
FieldPointer%(type*, var_index%):"_FieldPointer@8"
FieldArrayPointer%(type*, var_index):"_FieldArrayPointer@8"

FloatArraySetZeros(float_ptr%, num_floats%):"_FloatArraySetZeros@8"
FloatArrayAdd(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayAdd@12"
FloatArraySub(float_ptr0%, float_ptr1%, num_floats%):"_FloatArraySub@12"
FloatArrayMul(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayMul@12"
FloatArrayDiv(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayDiv@12"
FloatArraySqrt(float_ptr%, num_floats%):"_FloatArraySqrt@8"
FloatArrayMin(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayMin@12"
FloatArrayMax(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayMax@12"

FloatArrayEqual(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayEqual@12"
FloatArrayNotEqual(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayNotEqual@12"
FloatArrayLess(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayLess@12"
FloatArrayLessEqual(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayLessEqual@12"
FloatArrayGreater(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayGreater@12"
FloatArrayGreaterEqual(float_ptr0%, float_ptr1%, num_floats%):"_FloatArrayGreaterEqual@12"

FloatArrayAddFloat(float_ptr%, scalar#):"_FloatArrayAddFloat@8"
FloatArrayMulFloat(float_ptr%, scalar#):"_FloatArrayMulFloat@8"


; ------------ Script Class ------------

DebugCountcscriptObjs % () : "_cDebugCountcscriptObjs@0"

cClass%(name$) : "_cClass@4"
cClass_%(name$) : "_cClass2@4"
cNew%(Class) : "_cNew@4"
cClose%() : "_cClose@0"
cField%(Field$) : "_cField@4"
cClassName$(Class) : "_cClassName@4"
cClassDel(Class) : "_cClassDel@4"
cObjDel(obj) : "_cObjDel@4"
cSet(obj,datas$,fieldId%) : "_cSet@12"
cGet$(obj,fieldId%) : "_cGet@8"
cInsert(obj, after) : "_cInsert@8"
cFirst%(Class) : "_cFirst@4"
cLast%(Class) : "_cLast@4"
cBefore%(obj) : "_cBefore@4"
cAfter%(obj) : "_cAfter@4"
cFind%(Name$) : "_cFind@4"
